﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;

namespace WMSSystem.WYJ.Dto
{
   
        /// <summary>
        /// 出库基础信息DTO
        /// </summary>
        public class OutboundInfoDto : AuditedEntityDto<Guid>
        {
            /// <summary>
            /// 出库单号
            /// </summary>
            public string OutboundCode { get; set; }

            /// <summary>
            /// 仓库ID
            /// </summary>
            public Guid WarehouseId { get; set; }

            /// <summary>
            /// 仓库名称
            /// </summary>
            public string WarehouseName { get; set; }

            /// <summary>
            /// 出库类型
            /// </summary>
            public string OutboundType { get; set; }

            /// <summary>
            /// 出库日期
            /// </summary>
            public DateTime OutboundDate { get; set; }

            /// <summary>
            /// 客户名称
            /// </summary>
            public string CustomerName { get; set; }

            /// <summary>
            /// 联系人
            /// </summary>
            public string ContactPerson { get; set; }

            /// <summary>
            /// 联系方式
            /// </summary>
            public string ContactPhone { get; set; }

            /// <summary>
            /// 经办人
            /// </summary>
            public string Operator { get; set; }

            /// <summary>
            /// 备注
            /// </summary>
            public string Remark { get; set; }

            /// <summary>
            /// 状态
            /// </summary>
            public string Status { get; set; }

            /// <summary>
            /// 出库明细列表
            /// </summary>
            public List<OutboundDetailDto> OutboundDetails { get; set; }

            public OutboundInfoDto()
            {
                OutboundDetails = new List<OutboundDetailDto>();
            }
        }

        /// <summary>
        /// 创建出库单DTO
        /// </summary>
        public class CreateOutboundInfoDto
        {
            /// <summary>
            /// 仓库ID
            /// </summary>
            [Required]
            public Guid WarehouseId { get; set; }

            /// <summary>
            /// 仓库名称
            /// </summary>
            public string WarehouseName { get; set; }

            /// <summary>
            /// 出库类型
            /// </summary>
            [Required]
            [MaxLength(50)]
            public string OutboundType { get; set; }

            /// <summary>
            /// 出库日期
            /// </summary>
            [Required]
            public DateTime OutboundDate { get; set; }

            /// <summary>
            /// 客户名称
            /// </summary>
            [Required]
            [MaxLength(100)]
            public string CustomerName { get; set; }

            /// <summary>
            /// 联系人
            /// </summary>
            [MaxLength(50)]
            public string ContactPerson { get; set; }

            /// <summary>
            /// 联系方式
            /// </summary>
            [MaxLength(50)]
            public string ContactPhone { get; set; }

            /// <summary>
            /// 经办人
            /// </summary>
            [MaxLength(50)]
            public string Operator { get; set; }

            /// <summary>
            /// 备注
            /// </summary>
            [MaxLength(500)]
            public string Remark { get; set; }

            /// <summary>
            /// 出库明细列表
            /// </summary>
            [Required]
            public List<CreateOutboundDetailDto> OutboundDetails { get; set; }

            public CreateOutboundInfoDto()
            {
                OutboundDetails = new List<CreateOutboundDetailDto>();
            }
        }

        /// <summary>
        /// 更新出库单DTO
        /// </summary>
        public class UpdateOutboundInfoDto
        {
            /// <summary>
            /// 仓库ID
            /// </summary>
            [Required]
            public Guid WarehouseId { get; set; }

            /// <summary>
            /// 仓库名称
            /// </summary>
            public string WarehouseName { get; set; }

            /// <summary>
            /// 出库类型
            /// </summary>
            [Required]
            [MaxLength(50)]
            public string OutboundType { get; set; }

            /// <summary>
            /// 出库日期
            /// </summary>
            [Required]
            public DateTime OutboundDate { get; set; }

            /// <summary>
            /// 客户名称
            /// </summary>
            [Required]
            [MaxLength(100)]
            public string CustomerName { get; set; }

            /// <summary>
            /// 联系人
            /// </summary>
            [MaxLength(50)]
            public string ContactPerson { get; set; }

            /// <summary>
            /// 联系方式
            /// </summary>
            [MaxLength(50)]
            public string ContactPhone { get; set; }

            /// <summary>
            /// 经办人
            /// </summary>
            [MaxLength(50)]
            public string Operator { get; set; }

            /// <summary>
            /// 备注
            /// </summary>
            [MaxLength(500)]
            public string Remark { get; set; }

            /// <summary>
            /// 出库明细列表
            /// </summary>
            [Required]
            public List<UpdateOutboundDetailDto> OutboundDetails { get; set; }

            public UpdateOutboundInfoDto()
            {
                OutboundDetails = new List<UpdateOutboundDetailDto>();
            }
        }

        /// <summary>
        /// 出库单查询参数DTO
        /// </summary>
        public class GetOutboundListDto : PagedAndSortedResultRequestDto
        {
            /// <summary>
            /// 出库单号
            /// </summary>
            public string OutboundCode { get; set; }

            /// <summary>
            /// 仓库ID
            /// </summary>
            public Guid? WarehouseId { get; set; }

            /// <summary>
            /// 出库类型
            /// </summary>
            public string OutboundType { get; set; }

            /// <summary>
            /// 客户名称
            /// </summary>
            public string CustomerName { get; set; }

            /// <summary>
            /// 开始日期
            /// </summary>
            public DateTime? StartDate { get; set; }

            /// <summary>
            /// 结束日期
            /// </summary>
            public DateTime? EndDate { get; set; }

            /// <summary>
            /// 状态
            /// </summary>
            public string Status { get; set; }
        }
    }


